import index from '@/views/index';
// 概览
const overviewOf = () => import('../views/overviewOf/overviewOf.vue');
// 课件
const content = () => import('../views/content/contentSe.vue');
const details = () => import('../views/content/details.vue');
const curriculum = () => import('../views/content/curriculum.vue');
// 机构
// const institutions = () => import('../views/institutions/institutions.vue');
// const newAgency = () => import('../views/institutions/newAgency.vue');
// const agency = () => import('../views/institutions/newAgency.vue');
// const newTeacher = () => import('../views/institutions/newTeacher.vue');

// 用户
const theUser = () => import('../views/theUser/theUser.vue');
const userDetails = () => import('../views/theUser/userDetails.vue');
const learnDetails = () => import('../views/theUser/learnDetails.vue');
const theReport = () => import('../views/theUser/theReport.vue');
const newUsers = () => import('../views/theUser/newUsers.vue');
// 设备
const equipment = () => import('../views/equipment/equipment.vue');
const eqDetails = () => import('../views/equipment/eqDetails.vue');
const machine = () => import('../views/equipment/machine.vue');
// 统计
const statistical = () => import('../views/statistical/statistical.vue');
// 设置
const setUpThe = () => import('../views/setUpThe/setUpThe.vue');
const versionUpdate = () => import('../views/setUpThe/versionUpdate.vue');


const menuNav = [
  {
    path: '/',
    name: 'index',
    component: index,
    iconCls: 'el-icon-tickets',
    children: [
      {
        path: '/overviewOf',
        name: 'overviewOf',
        component: overviewOf,
        meta: {
          requireAuth: true,
          icon: 'el-icon-files',
          title: '概览',
          theTitle: '概览',
        },
        key: 'overviewOf'
      },
      {
        path: '/content',
        name: 'content',
        component: content,
        meta: {
          icon: 'el-icon-notebook-2',
          title: '课件',
          theTitle: '课件'
        },
        key: 'content',
        children: [
          {
            path: '/content/details',
            name: 'details',
            component: details,
            meta: {
              sideActiveName: 'content',
              theTitle: '课件列表详情'
            }
          },
          {
            path: '/content/curriculum',
            name: 'curriculum',
            component: curriculum,
            meta: {
              sideActiveName: 'content',
              theTitle: '新增课件'
            }
          }
        ]
      },
      {
        path: '/theUser',
        name: 'theUser',
        component: theUser,
        meta: {
          requireAuth: true,
          icon: 'el-icon-copy-document',
          title: '用户',
          theTitle: '用户'
        },
        key: 'theUser',
        children: [
          {
            path: '/theUser/userDetails',
            name: 'userDetails',
            component: userDetails,
            meta: {
              sideActiveName: 'theUser',
              theTitle: '用户详情'
            },
            children: [{
                path: '/theUser/userDetails/learnDetails',
                name: 'learnDetails',
                component: learnDetails,
                meta: {
                  sideActiveName: 'theUser',
                  theTitle: '学习记录'
                },
                children: [
                  {
                    path: '/theUser/userDetails/learnDetails/theReport',
                    name: 'theReport',
                    component: theReport,
                    meta: {
                      sideActiveName: 'theUser',
                      theTitle: '学习报告'
                    }
                  }
                ]
              },
            ]
          },
          {
            path: '/theUser/newUsers',
            name: 'newUsers',
            component: newUsers,
            meta: {
              sideActiveName: 'theUser',
              theTitle: '新增用户'
            }
          }
        ]
      },
      // {
      //   path: '/institutions',
      //   name: 'institutions',
      //   component: institutions,
      //   meta: {
      //     requireAuth: true,
      //     icon: 'el-icon-dish',
      //     title: '机构'
      //   },
      //   key: 'institutions',
      //   children: [
      //     {
      //       path: '/institutions/newAgency',
      //       name: 'newAgency',
      //       component: newAgency,
      //       meta: {
      //         sideActiveName: 'institutions'
      //       }
      //     },
      //     {
      //       path: '/institutions/agency',
      //       name: 'agency',
      //       component: agency,
      //       meta: {
      //         sideActiveName: 'institutions'
      //       }
      //     },
      //     {
      //       path: '/institutions/newTeacher',
      //       name: 'newTeacher',
      //       component: newTeacher,
      //       meta: {
      //         sideActiveName: 'institutions'
      //       }
      //     }
      //   ]
      // },
      {
        path: '/equipment',
        name: 'equipment',
        component: equipment,
        meta: {
          requireAuth: true,
          icon: 'el-icon-lock',
          title: '设备',
          theTitle: '设备'
        },
        key: 'equipment',
        children: [
          {
            path: '/equipment/eqDetails',
            name: 'eqDetails',
            title: '设备',
            component: eqDetails,
            meta: {
              requireAuth: true,
              sideActiveName: 'equipment',
              theTitle: '设备详情'
            }
          },
          {
            path: '/equipment/machine',
            name: 'machine',
            title: '设备',
            component: machine,
            meta: {
              sideActiveName: 'equipment',
              theTitle: '设备新增用户'
            }
          }
        ]
      },
      {
        path: '/statistical',
        name: 'statistical',
        component: statistical,
        meta: {
          requireAuth: true,
          icon: 'el-icon-pie-chart',
          title: '统计',
          theTitle: '统计'
        },
        key: 'statistical',
      },
      {
        path: '/setUpThe',
        name: 'setUpThe',
        component: setUpThe,
        meta: {
          requireAuth: true,
          icon: 'el-icon-setting',
          title: '设置',
          theTitle: '设置'
        },
        key: 'setUpThe',
        children: [
          {
            path: '/setUpThe/versionUpdate',
            name: 'versionUpdate',
            component: versionUpdate,
            meta: {
              requireAuth: true,
              sideActiveName: 'setUpThe',
              theTitle: '更新版本设置'
            }
          }
        ]
      },
    ]
  }
];

export default menuNav;
